<?php

require("../dbconnect.php");
require("../function.php");

$country_code = $_GET["country_id"];
$query = "SELECT a.id AS shipping_id, a.company_name, b.id AS rate_id, b.courier_id, b.country_id
									FROM os_shipping_company a
									INNER JOIN os_shipping_zone_country b ON a.id = b.courier_id
									WHERE b.country_id = '$country_code'
									GROUP BY a.id";
$get_shipping = mysql_query($query)or die(mysql_error());

$content = "<select name='service_preferred' id='service_preferred' class=text onchange='getShipping()'>";
$content.="<option value=''>Please select</option><option value='0' >Pick From Store</option>";


while ($p = mysql_fetch_array($get_shipping, MYSQL_ASSOC)) {
    $content.="<option value='" . $p['shipping_id'] . "'>" . $p['company_name'] . "</option>";
}

$content.="</select>
		
		
		";

echo $content;
?>